<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Configuration
 *
 * @author MinhNguyen
 */

class MailController {
    //put your code here
    public $model;
    public $view;
    
    public function __construct($model, $view) {
        $this->model = $model;
        $this->view = $view;
    }
    
    public function Send() {
        if(mail($this->model->to,$this->model->subject,$this->model->message,
                $this->model->headers) == FALSE) {
            $controller = new ErrorController(new Error(), new ErrorView, 
            "404", "Send failed!");
            $controller->returnError();
        }
    }
}
?>
